package practice_2025_11.practice_11_19;

import java.util.HashSet;
import java.util.Set;

class Solution {
    /**
     * 每日一题：将找到的值乘以2
     * @param nums
     * @param original
     * @return
     */

    public int findFinalValue(int[] nums, int original) {
        Set<Integer> hash = new HashSet<>();
        for(int i = 0; i < nums.length; i++) {
            hash.add(nums[i]);
        }
        while (hash.contains(original)) {
            original *= 2;
        }
        return original;
    }
}